if (window.location.href.indexOf('login') == -1 && checkLogin() == false) {
    alert('登录失效，请重新登录');
    window.location.href = '../template/login.php';
}
